<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员大病救助</title>
<link rel="stylesheet" type="text/css"
	href="../../css/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../css/themes/icon.css" />
<script type="text/javascript" src="../../js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../js/jquery.form.js"></script>
<script type="text/javascript"
	src="../../js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../js/ListData.js"></script>
<div id="readonly" style="display: none;"><%=request.getParameter("readonly")%></div>
<script type="text/javascript">
	function loadData(data) {
		$('#salvage_apply_info').form("load", data);
		$('#memberID').combotree("setValue", data.memberID);
	}
	function alterAction(url) {
		$("#salvage_apply_info").attr("action", url);
	}
	function clearForm() {
		$('#salvage_apply_info').clearForm();
	}
	$(function() {
		if ($("#readonly").text() === "readonly") {
			$("#feedback").attr("disabled", "disabled");
			$("#submitBTN").hide();
		}
		$('#salvage_apply_info').submit(function() {
			$(this).ajaxSubmit({
				clearForm : true,
				success : function() {
					alert("提交成功！");
					clearForm();
					window.parent.loadData();
				}
			});
			return false;
		});
		$.get("../../view/tree", function(str) {
			var objects = {};
			if (typeof str != "undefined" && str instanceof Array) {
				$(str).each(function(i, node) {
					objects[node.id] = node;
					node.text = node.unionName;
					node.url = "function/org_info_manager.jsp";
					node.children = node.members;
					$(node.children).each(function(i, m) {
						objects[m.id] = m;
						m.text = m.name;
						m.url = "function/member_info_manager.jsp";
					});
				});
				var datas = [];
				$(str).each(function(i, node) {
					var parent = objects[node.parentid];
					if (typeof parent != "undefined") {
						parent.children.push(node);
					} else {
						datas.push(node);
					}
				});
				if (datas.length > 0) {
					$('#memberID').combotree({
						data : datas,
						onlyLeafCheck : true,
						checkbox : false,
						valueField : 'id',
						textField : 'text',
						width : '300',
						multiple : false
					});

				}
			}
		})
	})
</script>
<style type="text/css">
body {
	text-align: center;
	margin: 0px;
	padding: 0px;
	width: 100%;
	height: 100%;
}
</style>
</head>
<body style="margin: 0">
	<form id="salvage_apply_info" name="salvage_apply_info" method="post"
		action="../../member/salvage/feedback">
		<table>
			<tr>
				<td nowrap="nowrap" width="100" align="right"></td>
				<td nowrap="nowrap" width="200" align="left"></td>
				<td nowrap="nowrap" width="100" align="right"></td>
				<td nowrap="nowrap" width="200" align="left"><input name="id"
					id="id" type="hidden" /></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">大病项目：</td>
				<td nowrap="nowrap" width="200" align="left" colspan="3"><textarea
						name="illnessItem" id="illnessItem" cols="60" disabled="disabled"></textarea></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">申请金额：</td>
				<td nowrap="nowrap" width="200" align="left"><input
					name="applyMoney" id="applyMoney" type="text" disabled="disabled" />元</td>
				<td nowrap="nowrap" width="100" align="right"></td>
				<td nowrap="nowrap" width="200" align="left"></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">所在工会意见：</td>
				<td nowrap="nowrap" width="200" align="left" colspan="3"><textarea
						name="localSuggest" id="localSuggest" cols="60"
						disabled="disabled"></textarea></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">审批金额：</td>
				<td nowrap="nowrap" width="200" align="left"><input
					name="approveMoney" id="approveMoney" type="text"
					disabled="disabled" />元</td>
				<td nowrap="nowrap" width="100" align="right"></td>
				<td nowrap="nowrap" width="200" align="left"></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">审批意见：</td>
				<td nowrap="nowrap" width="200" align="left" colspan="3"><textarea
						name="approveSuggest" id="approveSuggest" cols="60"
						disabled="disabled"></textarea></td>
			</tr>
			<tr>
				<td nowrap="nowrap" width="100" align="right">反馈意见：</td>
				<td nowrap="nowrap" width="200" align="left" colspan="3"><textarea
						name="feedback" id="feedback" cols="60"></textarea></td>
			</tr>
			<tr>
				<td colspan="4" align="center">
					<button id="submitBTN" name="submitBTN" type="submit">提交</button>
				</td>
			</tr>
		</table>
	</form>

</body>
</html>